﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Index.ascx.cs" Inherits="Photos.Index" %>

<script type="text/javascript" src='<%=ControlPath+"highslide/highslide-with-gallery.js" %>'></script>
<link rel="stylesheet" type="text/css" href='<%=ControlPath+"highslide/highslide.css" %>' />

<script type="text/javascript">
    hs.graphicsDir = '<%=ControlPath+"highslide/graphics/" %>';
    hs.align = 'center';
    hs.transitions = ['expand', 'crossfade'];
    hs.outlineType = 'rounded-white';
    hs.fadeInOut = true;
    //hs.dimmingOpacity = 0.75;

    // Add the controlbar
    hs.addSlideshow({
        //slideshowGroup: 'group1',
        interval: 5000,
        repeat: false,
        useControls: true,
        fixedControls: 'fit',
        overlayOptions: {
            opacity: 0.75,
            position: 'bottom center',
            hideOnMouseOut: true
        }
    });

</script>
<a href='<%=EditUrl("AddNewPhoto") %>' >Them moi</a>

<asp:Repeater ID="rpt" runat="server">
    <ItemTemplate>
        <div>
            <a href= '<%# UrlImage(Eval("img").ToString()) %>'class="highslide" onclick="return hs.expand(this)">
                <img src='<%# UrlImage("thum_"+Eval("img").ToString()) %>' alt="Highslide JS" title="Click to enlarge" /></a>
            <div class="highslide-caption">
               <div><%#Eval("title") %></div>
               <div><%# Eval("CreateDate").ToString()%></div>
               <div><%#Eval("Description") %></div>
            </div>
        </div>
        <asp:Panel ID="Panel1" runat="server" Visible='<%#DotNetNuke.Common.Globals.IsEditMode()%>'>
            [ <a href='<%#EditUrl("","","EditPhotos","id="+Eval("ID").ToString()) %>'>Sửa</a>
            ] [ <a href='<%#EditUrl("","","Delete","id="+Eval("ID").ToString()) %>'>Xóa</a>
            ]
        </asp:Panel>
    </ItemTemplate>
</asp:Repeater>
<div class="clear">
</div>
<div class="pager">
    <asp:Literal ID="pnPaging" runat="server"></asp:Literal>
</div>
